package com.uzai.console.service.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.md.mdgoods.ExemptionGoodsQuery;
import com.uzai.console.dto.md.mdgoods.ExemptionGoodsUpdateRedeemedQuantityDto;
import com.uzai.console.dto.md.mdgoods.MdGoodsQuery;
import com.uzai.console.dto.pyq.llygoods.PyqLlyGoodsUserIdDto;
import com.uzai.console.dto.pyq.llygoods.PyqLlyGoodsUserQuery;
import com.uzai.console.entity.MdGoods;
import com.uzai.console.service.feign.dto.GoodsUpdateExposureNumBySendPyqDto;
import com.uzai.console.service.feign.dto.LlyGoodsPageDto;
import com.uzai.console.service.feign.dto.StopGoodsDto;
import com.uzai.console.service.feign.impl.UzaiBusinessFallbackFactory;
import com.uzai.console.vo.md.exemptiongoods.ExemptionGoodsVo;
import com.uzai.console.vo.pyq.llygoods.PyqLlyGoodsUserVo;
import com.uzai.console.vo.pyq.llygoods.PyqLlyGoodsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 推老板商品库
 * @Auther: liuqi
 * @Date: 2021/11/24 16:22
 * @Description:
 */
@Component
@FeignClient(value = "uzai-business", fallbackFactory = UzaiBusinessFallbackFactory.class)
public interface UzaiBusinessFeignService {

    /**
     * 分页查询推老板悠哉精品库商品列表
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/romoteApi/goods/selectByPage")
    UzaiRespVo<Page<PyqLlyGoodsVo>> goodsSelectByPage(@RequestBody LlyGoodsPageDto llyGoodsPageDto);

    /**
     * 查询推老板悠哉精品库商品详情
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/romoteApi/goods/selectById")
    UzaiRespVo<PyqLlyGoodsVo> goodsSelectById(@RequestBody LlyGoodsPageDto llyGoodsPageDto);

    /**
     * 查询最新的推老板老悠哉精品库商品详情
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/romoteApi/goods/selectByNewest")
    UzaiRespVo<PyqLlyGoodsVo> goodsSelectByNewest(@RequestBody LlyGoodsPageDto llyGoodsPageDto);

    /**
     * 分页查询推老板悠哉精品库商品列表
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/romoteApi/goods/updateExposureNumBySendPyq")
    UzaiRespVo<Object> updateExposureNumBySendPyq(@RequestBody GoodsUpdateExposureNumBySendPyqDto goodsUpdateExposureNumBySendPyqDto);

    /**
     * 查询悠哉精品库商品基础曝光量
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/romoteApi/goods/selectBaseExposureNum")
    UzaiRespVo<Integer> selectBaseExposureNum();

    /**
     * 远程下线悠哉精品库商品
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/romoteApi/goods/stopGoods")
    UzaiRespVo<Object> stopGoods(@RequestBody StopGoodsDto stopGoodsDto);

    /**
     * 分页查询悠哉精品库悠友圈列表
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/romoteApi/goodsUser/findByPage")
    UzaiRespVo<Page<PyqLlyGoodsUserVo>> goodsUserFindByPage(@RequestBody PyqLlyGoodsUserQuery pyqLlyGoodsUserQuery);

    /**
     * 查询悠哉精品库悠友圈详情
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/romoteApi/goodsUser/selectById")
    UzaiRespVo<PyqLlyGoodsUserVo> goodsUserSelectById(@RequestBody PyqLlyGoodsUserIdDto pyqLlyGoodsUserIdDto);

    /**
     * 分页查询免单官方免单商品列表
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/business/exemptionGoodsExternal/getExemptionGoodsListByType")
    UzaiRespVo<Page<ExemptionGoodsVo>> findPageByMdExemptionGoods(@RequestBody ExemptionGoodsQuery exemptionGoodsQuery);

    /**
     * 官方免单商品兑换记录过期-增加商品兑换次数
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("business/exemptionGoodsExternal/updateExemptionGoodsRedeemedQuantity")
    UzaiRespVo<Object> updateExemptionGoodsRedeemedQuantity(@RequestBody ExemptionGoodsUpdateRedeemedQuantityDto exemptionGoodsUpdateRedeemedQuantityDto);
}
